package service.impl;

import bean.ProductComment;
import dao.IProductCommentDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import service.IProductCommentService;

import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional
public class ProductCommentServiceImpl implements IProductCommentService {
    @Resource
    private IProductCommentDao iProductCommentDao;

    @Override
    public List<ProductComment> queryAll() {
        return iProductCommentDao.queryAll();
    }

    @Override
    public ProductComment queryById(Integer cid) {
        return iProductCommentDao.queryById(cid);
    }

    @Override
    public void add(ProductComment productComment){iProductCommentDao.add(productComment);
    }

    @Override
    public void update(ProductComment productComment) {

        iProductCommentDao.update(productComment);
    }

    @Override
    public void delete(ProductComment productComment) {
        iProductCommentDao.delete(productComment);
    }
}
